package com.block.db.mapper;

import com.block.db.entity.SpecialCostomInfo;
import com.block.db.entity.SpecialCostomItemInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.block.db.model.param.SpeItemInfoParam;

import java.util.List;

/**
 * <p>
 * 机构推送子任务 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2022-11-11
 */
public interface SpecialCostomItemInfoMapper extends BaseMapper<SpecialCostomItemInfo> {

    /**
     * 查询所有 状态开启的商户的任务
     * 以及账户可用余额大于 任务设置的推送金额
     *
     * @return
     */
    List<SpecialCostomItemInfo> getAllEnableTaskList();

    /**
     * 查询分流模式 推送任务
     * @return
     */
    List<SpecialCostomItemInfo> getFlowItemInfoList();

    List<SpecialCostomItemInfo> getFlowItemInfoByParamList(SpeItemInfoParam speItemInfoParam);

    /**
     * 查询竞价模式 推送任务
     * @return
     */
    List<SpecialCostomItemInfo> getBiddItemInfoList();

    List<SpecialCostomItemInfo> getBiddItemInfoByParamList(SpeItemInfoParam speItemInfoParam);

    /**
     * 查询单个机构的可推送任务
     * 应用于手推
     * @param infoId
     * @return
     */
    List<SpecialCostomItemInfo> getEnableEntityList(Long infoId);

}
